<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>详情-预约试驾</title>
    <link rel="icon" href="${pageContext.request.contextPath}/assets/images/favicon.ico" type="image/ico">
    <link href="${pageContext.request.contextPath}/assets/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/assets/css/style.min.css" rel="stylesheet">
    <script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/jquery.min.js"></script>
    <%--    全局主题配置--%>
    <script type="text/javascript" src="${pageContext.request.contextPath}/assets/theme.js"></script>
    <link href="${pageContext.request.contextPath}/assets/codeying.css" rel="stylesheet">
</head>
<%--translucent--%>
<%--dark--%>
<body data-theme="default">
<div class="lyear-layout-web">
    <div class="lyear-layout-container">

        <!-- 页面头部 -->
        <jsp:include page="../header.jsp"></jsp:include>
        <!-- 导航侧栏 -->
        <jsp:include page="../sidebar.jsp"></jsp:include>

        <!--页面主要内容-->
        <main class="lyear-layout-content">

            <div class="container-fluid">

                <div class="row">
                    <div class="col-lg-12">
                        <div class="card">
                            <div class="card-header"><h4>预约试驾 详情</h4></div>
                            <div class="card-body">
                                <form class="form-horizontal">
                                    <div class="form-group">
                                        <label class="col-xs-12">用户</label>
                                        <div class="col-xs-12">
                                            <div class="table-responsive">
                                                <c:if test="${ item.useridFrn !=null}">
                                                    <table class="table">
                                                        <thead>
                                                        <tr>
                                                            <th>用户名</th>
                                                            <th>姓名</th>
                                                            <th>性别</th>
                                                            <th>电话</th>
                                                            <th>邮箱</th>
                                                        </tr>
                                                        </thead>
                                                        <tbody>
                                                        <tr>
                                                            <td>${ item.useridFrn.username }</td>
                                                            <td>${ item.useridFrn.name }</td>
                                                            <td>${ item.useridFrn.gender }</td>
                                                            <td>${ item.useridFrn.tele }</td>
                                                            <td>${ item.useridFrn.email }</td>
                                                        </tr>
                                                        </tbody>
                                                    </table>
                                                </c:if>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-xs-12">汽车</label>
                                        <div class="col-xs-12">
                                            <div class="table-responsive">
                                                <c:if test="${ item.cidFrn !=null}">
                                                    <table class="table">
                                                        <thead>
                                                        <tr>
                                                            <th>汽车首图</th>
                                                            <th>汽车标题</th>
                                                            <th>汽车描述</th>
                                                            <th>价格每天</th>
                                                            <th>汽车租赁说明</th>
                                                            <th>发布时间</th>
                                                            <th>展示</th>
                                                        </tr>
                                                        </thead>
                                                        <tbody>
                                                        <tr>
                                                            <td>
                                                                <c:if test="${ not empty item.cidFrn.showpic}">
                                                                    <c:choose>
                                                                        <c:when test="${ fn:endsWith(item.cidFrn.showpic,'.jpg') or fn:endsWith(item.cidFrn.showpic,'.JPG')or fn:endsWith(item.cidFrn.showpic,'.png')or fn:endsWith(item.cidFrn.showpic,'.gif')or fn:endsWith(item.cidFrn.showpic,'.bmp')or fn:endsWith(item.cidFrn.showpic,'.tiff')}">
                                                                            <!--图片-->
                                                                            <img style="max-height: 50px;"
                                                                                 src="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.showpic}"/>
                                                                        </c:when>
                                                                        <c:when test="${ fn:endsWith(item.cidFrn.showpic,'.mp4') or fn:endsWith(item.cidFrn.showpic,'.avi')or fn:endsWith(item.cidFrn.showpic,'.wmv')or fn:endsWith(item.cidFrn.showpic,'.WMV')or fn:endsWith(item.cidFrn.showpic,'.flv')}">
                                                                            <!--视频-->
                                                                            <video style="max-height: 100px;"
                                                                                   src="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.showpic}"
                                                                                   muted="muted" loop="loop"
                                                                                   controls></video>
                                                                        </c:when>
                                                                        <c:when test="${ fn:endsWith(item.cidFrn.showpic,'.mp3') or fn:endsWith(item.cidFrn.showpic,'.wma')or fn:endsWith(item.cidFrn.showpic,'.WMA')}">
                                                                            <!--音频-->
                                                                            <audio src="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.showpic}"
                                                                                   controls="controls"></audio>
                                                                        </c:when>
                                                                        <c:otherwise>
                                                                            <a style="color:#208b6b"
                                                                               href="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.showpic }"
                                                                               target="_blank">
                                                                                下载
                                                                            </a>
                                                                        </c:otherwise>
                                                                    </c:choose>
                                                                </c:if>
                                                            </td>
                                                            <td>${ item.cidFrn.showtitle }</td>
                                                            <td>${ item.cidFrn.showdesc }</td>
                                                            <td>${ item.cidFrn.price }</td>
                                                            <td>${ item.cidFrn.showdetail }</td>
                                                            <td><fmt:formatDate value='${ item.cidFrn.publishtime }'
                                                                                pattern='yyyy-MM-dd HH:mm:ss'/></td>
                                                            <td>
                                                                <c:if test="${ not empty item.cidFrn.carpic}">
                                                                    <c:choose>
                                                                        <c:when test="${ fn:endsWith(item.cidFrn.carpic,'.jpg') or fn:endsWith(item.cidFrn.carpic,'.JPG')or fn:endsWith(item.cidFrn.carpic,'.png')or fn:endsWith(item.cidFrn.carpic,'.gif')or fn:endsWith(item.cidFrn.carpic,'.bmp')or fn:endsWith(item.cidFrn.carpic,'.tiff')}">
                                                                            <!--图片-->
                                                                            <img style="max-height: 50px;"
                                                                                 src="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.carpic}"/>
                                                                        </c:when>
                                                                        <c:when test="${ fn:endsWith(item.cidFrn.carpic,'.mp4') or fn:endsWith(item.cidFrn.carpic,'.avi')or fn:endsWith(item.cidFrn.carpic,'.wmv')or fn:endsWith(item.cidFrn.carpic,'.WMV')or fn:endsWith(item.cidFrn.carpic,'.flv')}">
                                                                            <!--视频-->
                                                                            <video style="max-height: 100px;"
                                                                                   src="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.carpic}"
                                                                                   muted="muted" loop="loop"
                                                                                   controls></video>
                                                                        </c:when>
                                                                        <c:when test="${ fn:endsWith(item.cidFrn.carpic,'.mp3') or fn:endsWith(item.cidFrn.carpic,'.wma')or fn:endsWith(item.cidFrn.carpic,'.WMA')}">
                                                                            <!--音频-->
                                                                            <audio src="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.carpic}"
                                                                                   controls="controls"></audio>
                                                                        </c:when>
                                                                        <c:otherwise>
                                                                            <a style="color:#208b6b"
                                                                               href="${ pageContext.request.contextPath}/file?filename=${ item.cidFrn.carpic }"
                                                                               target="_blank">
                                                                                下载
                                                                            </a>
                                                                        </c:otherwise>
                                                                    </c:choose>
                                                                </c:if>
                                                            </td>
                                                        </tr>
                                                        </tbody>
                                                    </table>
                                                </c:if>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-xs-12">预约试驾时间</label>
                                        <div class="col-xs-12">
                                            <input readonly class="form-control w200" type="text" name="shijian"
                                                   value="<fmt:formatDate value='${ item.shijian }' pattern='yyyy-MM-dd HH:mm:ss'/>">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-xs-12">预约说明</label>
                                        <div class="col-xs-12">
                                            <input readonly class="form-control w200" type="text" name="shuom"
                                                   value="${ item.shuom }">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-xs-12">预约结果</label>
                                        <div class="col-xs-12">
                                            <input readonly class="form-control w200" type="text" name="jieguo"
                                                   value="${ item.jieguo }">
                                        </div>
                                    </div>
                                </form>
                            </div>


                        </div>
                    </div>
                </div>

            </div>

        </main>
        <!--End 页面主要内容-->
    </div>
</div>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/js/main.min.js"></script>
</body>
</html>

